import 'package:flutter/material.dart';

class TwoPage extends StatelessWidget {
  var count;

  TwoPage({Key? key, this.count}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(

        home: Scaffold(
          appBar: AppBar(
            title: Text("flutter=第二个页面=哈哈$count"),
          ),
          body: Center(
            child: Container(
              color: Colors.yellow,
              width: double.infinity,
              margin: EdgeInsets.symmetric(horizontal: 10,vertical: 20),
              child: Column(

                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  FlutterLogo(),
                  ElevatedButton(onPressed: (){
                    Navigator.pop(context);
                  }, child: Text("返回1"))
                ],
              ),
            ),
          ),
        ),
        theme: ThemeData(primaryColor: Colors.green));
  }
}
